from datetime import datetime
from exts import db


class FaultRecord(db.Model):
    date_time = db.Column(db.DateTime, default=datetime.now(), primary_key=True)
    phenomenon = db.Column(db.String(100), nullable=False)
    location = db.Column(db.String(100), nullable=False)
    cause = db.Column(db.String(100), nullable=False)
    material = db.Column(db.String(100), nullable=False)
    result = db.Column(db.String(100), nullable=False)